Optimal. Leaf size=261 \[ \frac {1}{2} \left (2 a^2+b^2\right ) x+\frac {i a b e^{i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right )}{g n}-\frac {i a b e^{-i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{2 i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{-2 i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )}{g n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3448, 3447,
2239, 3446} \begin {gather*} \frac {i a b e^{i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \text {Gamma}\left (\frac {1}{n},-i d (f+g x)^n\right )}{g n}-\frac {i a b e^{-i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \text {Gamma}\left (\frac {1}{n},i d (f+g x)^n\right )}{g n}+\frac {b^2 e^{2 i c} 2^{-\frac {1}{n}-2} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \text {Gamma}\left (\frac {1}{n},-2 i d (f+g x)^n\right )}{g n}+\frac {b^2 e^{-2 i c} 2^{-\frac {1}{n}-2} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \text {Gamma}\left (\frac {1}{n},2 i d (f+g x)^n\right )}{g n}+\frac {1}{2} x \left (2 a^2+b^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2239
Rule 3446
Rule 3447
Rule 3448
Rubi steps
\begin {align*} \int \left (a+b \sin \left (c+d (f+g x)^n\right )\right )^2 \, dx &=\int \left (a^2+\frac {b^2}{2}-\frac {1}{2} b^2 \cos \left (2 c+2 d (f+g x)^n\right )+2 a b \sin \left (c+d (f+g x)^n\right )\right ) \, dx\\ &=\frac {1}{2} \left (2 a^2+b^2\right ) x+(2 a b) \int \sin \left (c+d (f+g x)^n\right ) \, dx-\frac {1}{2} b^2 \int \cos \left (2 c+2 d (f+g x)^n\right ) \, dx\\ &=\frac {1}{2} \left (2 a^2+b^2\right ) x+(i a b) \int e^{-i c-i d (f+g x)^n} \, dx-(i a b) \int e^{i c+i d (f+g x)^n} \, dx-\frac {1}{4} b^2 \int e^{-2 i c-2 i d (f+g x)^n} \, dx-\frac {1}{4} b^2 \int e^{2 i c+2 i d (f+g x)^n} \, dx\\ &=\frac {1}{2} \left (2 a^2+b^2\right ) x+\frac {i a b e^{i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right )}{g n}-\frac {i a b e^{-i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{2 i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )}{g n}+\frac {2^{-2-\frac {1}{n}} b^2 e^{-2 i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )}{g n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.53, size = 247, normalized size = 0.95 \begin {gather*} \frac {2 \left (2 a^2+b^2\right ) g n x+2^{-1/n} b^2 e^{2 i c} (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-2 i d (f+g x)^n\right )+2^{-1/n} b^2 e^{-2 i c} (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},2 i d (f+g x)^n\right )-4 i a b (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},i d (f+g x)^n\right ) (\cos (c)-i \sin (c))+4 i a b (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac {1}{n},-i d (f+g x)^n\right ) (\cos (c)+i \sin (c))}{4 g n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \left (a +b \sin \left (c +d \left (g x +f \right )^{n}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d \left (f + g x\right )^{n} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\sin \left (c+d\,{\left (f+g\,x\right )}^n\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________